﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Themes/Fantasy/Views/Shared/Site.Master" %>
<%@ Import Namespace="AFDS.BusinessLogic" %>
<%@ Import Namespace="AFDS.Core" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<% Html.RenderPartial("AFDSSubMenu");%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">    
<fieldset class="MvcMembership">
	<legend><%=ViewData["Title"] %></legend>

<% Category c = (Category)ViewData["Category"]; %>    
    
    
<% Html.BeginForm("EditCategory", "AFDSAdmin"); %>    
    <form method="post" action="/AFDSAdmin/EditCategory">
        <%=Html.Hidden("id", c.Id.ToString()) %>
        <%=Html.Hidden("actionType", ViewData["actionType"])%>
        <label for="name">Name:</label>
        <input id="name" name="name" type="text" value="<%=c.Name %>" />
        <label for="Description">Description:</label>
        <input id="description" name="description" type="text" value="<%=c.Description %>" />
        <label for="cbCategories">Parent Category:</label>
        <%=Html.DropDownList("Key", (MultiSelectList)ViewData["cbCategories"])%>                 
        <label for="Slug">Slug:</label>
        <input id="slug" name="slug" type="text" value="<%=c.Slug %>" />               
		<label for="IsEnabled">Is Enabled:</label>
		<input type="checkbox" id="IsEnabled" name="IsEnabled" <% =bool.Parse( ( c.Enable.ToString() ?? true.ToString() ).ToString() ) ? "checked=\"checked\"" : "" %> />                
		<label for="AllowSites">Allow Sites:</label>
		<input type="checkbox" id="AllowSites" name="AllowSites" <% =bool.Parse( ( c.AllowSites.ToString() ?? true.ToString() ).ToString() ) ? "checked=\"checked\"" : "" %> />                		
		<br />
		<input type="submit" value="<% = ViewData["actionType"]%>" /> 
<% Html.EndForm(); %>   

</fieldset>

</asp:Content>